package com.qfxl.common.config.webMvcConfig;

import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class TokenAutoConfiguration {

    @Bean
    @ConditionalOnMissingBean(TokenValidationListener.class) // 只有当容器中没有其他 MyService 实现时才创建
    public TokenValidationListener tokenValidationListener() {
        return new DefToken();
    }
}